﻿using System;
using System.Windows.Data;
using BuildARoute.BARDataService;
using Microsoft.Maps.MapControl;

namespace BuildARoute
{
    public class POI2LocationConverter : IValueConverter
    {

        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var poi = value as POI;
            Location loc = new Location(poi.Latitude, poi.Longitude, 0, AltitudeReference.Ground);
            return loc;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
